package com.swf.seed.test.jep;

import org.nfunk.jep.JEP;

import main.main;

public class A {
	public static void main(String[] args) {
		JEP j = new JEP();
		Object val3;
		j.addStandardConstants();
		j.addStandardFunctions(); 
		j.addComplex(); 
		j.setAllowUndeclared(true); 
		j.setImplicitMul(true);   // switch assignment facilities on 
		j.setAllowAssignment(true);  
		// parse assignment equations 
		String x = "100";
		String pattern="this/(10+10)*2";
		pattern = pattern.replace("this", x);
		j.parseExpression(pattern);
		System.out.println("Value is " + j.getValueAsObject());
	}
}
